-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Added new exception for nested fields to force it to fallback to legacy #205
Conversation
Signed-off-by: Guian Gumpac <[email protected]>
Codecov Report
@@ Coverage Diff @@
## integ-nested-fallback #205 +/- ##
===========================================================
- Coverage 98.35% 98.32% -0.04%
- Complexity 3609 3611 +2
===========================================================
Files 344 345 +1
Lines 8946 8952 +6
Branches 569 571 +2
===========================================================
+ Hits 8799 8802 +3
- Misses 142 144 +2
- Partials 5 6 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -48,6 +50,12 @@ public TypeEnvironment(TypeEnvironment parent, SymbolTable symbolTable) { | |||
@Override | |||
public ExprType resolve(Symbol symbol) { | |||
for (TypeEnvironment cur = this; cur != null; cur = cur.parent) { | |||
if (!cur.symbolTable.lookup(symbol).isEmpty() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there is already a fallback mechanism HERE. Could we alter this to work for nested with partiql syntax? At a quick glance I'm not sure why it's not working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason the running SELECT message.info
doesn't hit that code actually. Will investigate. Thanks!
Looks fine to me so far (except for the failing checks)... |
Thanks! I will have a test for the exception being thrown. |
if (!cur.symbolTable.lookup(symbol).isEmpty() | ||
&& cur.symbolTable.lookup(symbol).get().equals(ExprCoreType.ARRAY)) { | ||
throw new UnsupportedV2NestedException( | ||
String.format("can't resolve %s type in the new engine", symbol)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should mention unsupported...
"%s type is unsupported in the new engine"
Signed-off-by: Guian Gumpac [email protected]
Description
A new exception was made for nested fields that is thrown when the field is of type
(ExprCoreTye)ARRAY
. There is one old unit test and one old integration tests that are failing and to be investigated.Issues Resolved
opensearch-project#1277
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.